<div class="modal-dialog">
	<div class="modal-content">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
			<h3><?php echo $this->lang->line("detail_portfolio")?></h3>
		</div>
		<div class="modal-body">
			<?php 
			if(isset($portfolio) && $portfolio->num_rows()>0){
				$portfolio = $portfolio->row();
				if($portfolio->main_img != '' && file_exists($this->config->item('static_path').'files/portfolios/'.$portfolio->main_img)){
					$image = portfolio_image_url('thumbs/' . $portfolio->main_img);
				}else{
					$image = image_url("img_default_280.jpg");
				}
			?>
			<div class="col-md-12">
				<div class="col-md-3">
					<img class="img-responsive" src="<?php echo $image?>">
				</div>
				<div class="col-md-9">
					<div class="row">
						<div class="control-group">
							<label class="control-label col-md-3"><?php echo $this->lang->line('title'); ?></label>
							<div class="controls col-md-9">
								<?php echo $portfolio->title?>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="control-group">
							<label class="control-label col-md-3"><?php echo $this->lang->line('description'); ?></label>
							<div class="controls col-md-9">
								<?php echo $portfolio->description?>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="control-group">
							<label class="control-label col-md-3"><?php echo $this->lang->line('category'); ?></label>
							<div class="controls col-md-9">
								<?php 
								$ids= explode(',',$portfolio->categories);
								if(isset($categories) and $categories->num_rows()>0)
								{
								  foreach($categories->result() as $category)
								  {
								    if(in_array($category->id,$ids))
								      echo "<a href='".site_url('project/category/'.$category->id)."'>".$category->category_name."</a>, ";
								  }
								}
                                ?>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div style="clear:both"></div>
			<?php } ?>
		</div>
		<div class="modal-footer">
			<button type="button" data-dismiss="modal" class="btn btn-primary">Ok</button>
		</div>
	</div>
</div>